/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * jifAdministrarGrupo.java
 *
 * Created on 19-oct-2010, 11:12:51
 */

package Suministros;
import administracion.delegate.GestionPedidosDelegate;
import administracion.helper.Listas;
import administracion.helper.Utiles_MensajesDialogo;
import com.jidesoft.hints.ListDataIntelliHints;
import java.awt.event.KeyEvent;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import suministros.ejb30.TO.GrupoSuministrosTO;
import suministros.ejb30.TO.TipoTO;
import suministros.ejb30.entity.GrupoSuministros;
import suministros.ejb30.entity.Tipo;
/**
 *
 * @author Diana
 */
public class jifAdministrarGrupo extends javax.swing.JInternalFrame {
    private ListDataIntelliHints intelliHintsGrupo;
    List<TipoTO> listaTipos;
     GrupoSuministrosTO grupo;
     List<GrupoSuministrosTO> listaGrupos;
    /** Creates new form jifAdministrarGrupo */
    public jifAdministrarGrupo() {
        initComponents();
        try {
            cargaHintsIndependientes();
        } catch (Exception ex) {
            Logger.getLogger(jifAdministrarGrupo.class.getName()).log(Level.SEVERE, null, ex);
        }
        llenarComboTipoSuministro();
        llenarComboGrupoSuministros();

    }
  private void cargaHintsIndependientes() {
    this.intelliHintsGrupo = new ListDataIntelliHints(this.jtfDescGrupo, Listas.getGruposuministros());
  }
    private void buscarGrupos()
  {
    this.grupo = null;
    GrupoSuministrosTO sumi;
    if (this.jtfCodGrupo.getText().trim().length() < 1) {

      try { sumi = (GrupoSuministrosTO)this.intelliHintsGrupo.getSelectedHint();
      } catch (NullPointerException ex) {
        sumi = null;
      }
    } else {
      sumi = Listas.getGrupoCodigo(this.jtfCodGrupo.getText().trim());
    }

    if (sumi == null) {
      Utiles_MensajesDialogo.mensajeError("El suministro no existe!");
      this.jtfDescGrupo.setText("");
      //this.jbtAceptar.setEnabled(false);
     } else {
      this.jtfDescGrupo.setText(sumi.toString());
      this.jtfCodGrupo.setText(sumi.getCodigo());
      this.jtfCodGrupo.setEditable(false);
      //this.jbtAceptar.setEnabled(true);
      this.grupo = sumi;
      consultar();
    }
  }

    private void llenarComboTipoSuministro() {
        listaTipos = null;
        List listaTipos_cbo1 = this.cboBeanBindingTipo1.getLista();
        listaTipos_cbo1.clear();
        try
        {
          listaTipos = Listas.getTipo_porTabla("tipo_suministros");

          this.cboBeanBindingTipo1.setLista(listaTipos);
          this.bindingGroup.bind();
          this.jcbTipo.updateUI();
          this.jcbTipo.setSelectedIndex(-1);
        } catch (Exception ex) {
          Utiles_MensajesDialogo.mensajeAlerta("Error al obtener Tipos\n" + ex.getMessage());
          ex.printStackTrace();
          Logger.getLogger(jifRegistrarGrupoSuministros.class.getName()).log(Level.SEVERE, null, ex);
        }
      }
       private void llenarComboGrupoSuministros() {
        listaGrupos = null;
        List listaTipos_cbo1 = this.cboBeanBindingGrupoSuministro1.getLista();
        listaTipos_cbo1.clear();
        try
        {
          listaGrupos = Listas.getGrupospadre();

          this.cboBeanBindingGrupoSuministro1.setLista(listaGrupos);
          this.bindingGroup.bind();
          this.jcbGrupo.updateUI();
          this.jcbGrupo.setSelectedIndex(-1);
        } catch (Exception ex) {
          Utiles_MensajesDialogo.mensajeAlerta("Error al obtener Tipos\n" + ex.getMessage());
          ex.printStackTrace();
          Logger.getLogger(jifRegistrarSuministros.class.getName()).log(Level.SEVERE, null, ex);
        }
      }
      public Boolean validar(){
           Boolean estado=true;
           if(this.jcbGrupo.getSelectedIndex()<0){
               Utiles_MensajesDialogo.mensajeAlerta("Necesita asignarle un grupo antecesor");
               estado=false;
           }
           if(this.jcbTipo.getSelectedIndex()<0){
               Utiles_MensajesDialogo.mensajeAlerta("Necesita asignarle un tipo de suministro");
               estado=false;
           }
           return estado;
       }
      public void consultar(){
        GrupoSuministrosTO grupoSumi= new GrupoSuministrosTO();
        try {
           grupoSumi= GestionPedidosDelegate.getInstance().getListaGrupoSuministrosAdministrar(grupo.getCodigo()).get(0);
        } catch (Exception ex) {
            Logger.getLogger(jifAdministrarSuministros.class.getName()).log(Level.SEVERE, null, ex);
        }
         this.jcbTipo.setSelectedItem(this.obtenerTipo(grupoSumi.getTipoSuministro()));
         this.jcbGrupo.setSelectedItem(this.obtenerGrupo(grupoSumi.getCod_antecesor()));
            this.ctaalm.setText(grupoSumi.getCuenta_almacen());
            this.acmd.setText(grupoSumi.getCuenta_acmd());
            this.acmh.setText(grupoSumi.getCuenta_acmh());
            this.actpro.setText(grupoSumi.getCuenta_actpro());
            this.ctacmp.setText(grupoSumi.getCuenta_compra());
            this.ctafis.setText(grupoSumi.getCuenta_credfis());
            this.cta4ta.setText(grupoSumi.getCuenta_cta4ta());
            this.cta721.setText(grupoSumi.getCuenta_cta721());
            this.ctafona.setText(grupoSumi.getCuenta_ctafona());
            this.ctaod.setText(grupoSumi.getCuenta_ctaod());
            this.ctaodi.setText(grupoSumi.getCuenta_ctaodi());
            this.ctaohi.setText(grupoSumi.getCuenta_ctaoh());
            this.ctarec.setText(grupoSumi.getCuenta_ctarec());
            this.donacion.setText(grupoSumi.getCuenta_donacion());
            this.impuesto.setText(grupoSumi.getCuenta_impuesto());
            this.ctainv.setText(grupoSumi.getCuenta_inversion());
            this.ctalink.setText(grupoSumi.getCuenta_link());
            this.actmat.setText(grupoSumi.getCuenta_materiales());
            this.sosobra.setText(grupoSumi.getCuenta_obra());
            this.otros.setText(grupoSumi.getCuenta_otros());
            this.ctaprov.setText(grupoSumi.getCuenta_prov());
            this.serpro.setText(grupoSumi.getCuenta_serpro());
            this.ctaser.setText(grupoSumi.getCuenta_servicio());
            this.ctatran.setText(grupoSumi.getCuenta_transferencia());
            this.ctavarex.setText(grupoSumi.getCuenta_varex());
         

   }
    public TipoTO obtenerTipo(int codigo){
        TipoTO tip= new TipoTO();
        for(int i=0 ; i<this.listaTipos.size(); i++){
            if((((TipoTO)listaTipos.get(i)).getId_tabla_tipo())==(codigo)){
                tip= (TipoTO)listaTipos.get(i);
            }
        }
        return tip;
    }
    
    
       public GrupoSuministrosTO obtenerGrupo(String codigo){
        GrupoSuministrosTO tip= new GrupoSuministrosTO();
        for(int i=0 ; i<this.listaGrupos.size(); i++){
            if((((GrupoSuministrosTO)listaGrupos.get(i)).getCodigo()).compareTo(codigo)==0){
                tip= (GrupoSuministrosTO)listaGrupos.get(i);
            }
        }
        return tip;
    }
       public void registrar(){

            String grupo=((GrupoSuministrosTO)this.jcbGrupo.getSelectedItem()).getCodigo();
            int tipo=((TipoTO)this.jcbTipo.getSelectedItem()).getId_tabla_tipo();
            GrupoSuministros sumi= new GrupoSuministros();
            sumi.setAlta(true);
            sumi.setCodgrupoantecesorSumi(new GrupoSuministros(grupo));
            sumi.setCodGrupoSumi(this.jtfCodGrupo.getText());
            sumi.setTipoSuministros(new Tipo(tipo));
            sumi.setCuenta_almacen(this.ctaalm.getText());
            sumi.setCuenta_acmd(this.acmd.getText());
            sumi.setCuenta_acmh(this.acmh.getText());
            sumi.setCuenta_actpro(this.actpro.getText());
            sumi.setCuenta_compra(this.ctacmp.getText());
            sumi.setCuenta_credfis(this.ctafis.getText());
            sumi.setCuenta_cta4ta(this.cta4ta.getText());
            sumi.setCuenta_cta721(this.cta721.getText());
            sumi.setCuenta_ctafona(this.ctafona.getText());
            sumi.setCuenta_ctaod(this.ctaod.getText());
            sumi.setCuenta_ctaodi(this.ctaodi.getText());
            sumi.setCuenta_ctaoh(this.ctaohi.getText());
            sumi.setCuenta_ctarec(this.ctarec.getText());
            sumi.setCuenta_donacion(this.donacion.getText());
            sumi.setCuenta_impuesto(this.impuesto.getText());
            sumi.setCuenta_inversion(this.ctainv.getText());
            sumi.setCuenta_link(this.ctalink.getText());
            sumi.setCuenta_materiales(this.actmat.getText());
            sumi.setCuenta_obra(this.sosobra.getText());
            sumi.setCuenta_otros(this.otros.getText());
            sumi.setCuenta_prov(this.ctaprov.getText());
            sumi.setCuenta_serpro(this.serpro.getText());
            sumi.setCuenta_servicio(this.ctaser.getText());
            sumi.setCuenta_transferencia(this.ctatran.getText());
            sumi.setCuenta_varex(this.ctavarex.getText());
            sumi.setDescripciongrupo(this.jtfDescGrupo.getText());

        try {
            GestionPedidosDelegate.getInstance().administrarGrupo(sumi);
             Utiles_MensajesDialogo.mensajeExito();
             limpiar();
        } catch (Exception ex) {
             Utiles_MensajesDialogo.mensajeError("No se pudo completar la transaccion");
        }

        }
        public void limpiar(){

            this.ctaalm.setText("");
            this.acmd.setText("");
            this.acmh.setText("");
            this.actpro.setText("");
            this.ctacmp.setText("");
            this.ctafis.setText("");
            this.cta4ta.setText("");
            this.cta721.setText("");
            this.ctafona.setText("");
            this.ctaod.setText("");
            this.ctaodi.setText("");
            this.ctaohi.setText("");
            this.ctarec.setText("");
            this.donacion.setText("");
            this.impuesto.setText("");
            this.ctainv.setText("");
            this.ctalink.setText("");
            this.actmat.setText("");
            this.sosobra.setText("");
            this.otros.setText("");
            this.ctaprov.setText("");
            this.serpro.setText("");
            this.ctaser.setText("");
            this.ctatran.setText("");
            this.ctavarex.setText("");
            this.jtfDescGrupo.setText("");
            this.jcbGrupo.setSelectedIndex(-1);
            this.jcbTipo.setSelectedIndex(-1);
            this.jtfCodGrupo.setText("");
        }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        bindingGroup = new org.jdesktop.beansbinding.BindingGroup();

        cboBeanBindingTipo1 = new administracion.BeanBinding.CboBeanBindingTipo();
        cboBeanBindingGrupoSuministro1 = new administracion.BeanBinding.CboBeanBindingGrupoSuministro();
        jToolBar1 = new javax.swing.JToolBar();
        jcbTipo = new javax.swing.JComboBox();
        jcbGrupo = new javax.swing.JComboBox();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jbtAceptar = new javax.swing.JButton();
        jbtCancelar = new javax.swing.JButton();
        jLabel10 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        ctaohi = new javax.swing.JTextField();
        ctarec = new javax.swing.JTextField();
        ctaoh = new javax.swing.JTextField();
        ctaodi = new javax.swing.JTextField();
        cta721 = new javax.swing.JTextField();
        ctaod = new javax.swing.JTextField();
        cta4ta = new javax.swing.JTextField();
        ctafona = new javax.swing.JTextField();
        acmh = new javax.swing.JTextField();
        acmd = new javax.swing.JTextField();
        ctainv = new javax.swing.JTextField();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        serpro = new javax.swing.JTextField();
        ctaser = new javax.swing.JTextField();
        donacion = new javax.swing.JTextField();
        actmat = new javax.swing.JTextField();
        actpro = new javax.swing.JTextField();
        impuesto = new javax.swing.JTextField();
        ctaprov = new javax.swing.JTextField();
        ctavarex = new javax.swing.JTextField();
        sosobra = new javax.swing.JTextField();
        ctalink = new javax.swing.JTextField();
        jLabel28 = new javax.swing.JLabel();
        ctacmp = new javax.swing.JTextField();
        ctatran = new javax.swing.JTextField();
        jLabel29 = new javax.swing.JLabel();
        jLabel24 = new javax.swing.JLabel();
        jLabel25 = new javax.swing.JLabel();
        jLabel22 = new javax.swing.JLabel();
        jLabel23 = new javax.swing.JLabel();
        jLabel26 = new javax.swing.JLabel();
        jLabel27 = new javax.swing.JLabel();
        jLabel19 = new javax.swing.JLabel();
        jLabel18 = new javax.swing.JLabel();
        jLabel21 = new javax.swing.JLabel();
        jLabel20 = new javax.swing.JLabel();
        ctafis = new javax.swing.JTextField();
        jLabel11 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jLabel14 = new javax.swing.JLabel();
        jLabel15 = new javax.swing.JLabel();
        jLabel16 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        ctaalm = new javax.swing.JTextField();
        jLabel17 = new javax.swing.JLabel();
        otros = new javax.swing.JTextField();
        jtfDescGrupo = new javax.swing.JTextField();
        jLabel30 = new javax.swing.JLabel();
        jtfCodGrupo = new javax.swing.JTextField();
        jLabel1 = new javax.swing.JLabel();

        jToolBar1.setRollover(true);

        setTitle("ADMINISTRAR GRUPOS DE SUMINISTROS");

        org.jdesktop.beansbinding.ELProperty eLProperty = org.jdesktop.beansbinding.ELProperty.create("${lista}");
        org.jdesktop.swingbinding.JComboBoxBinding jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, cboBeanBindingTipo1, eLProperty, jcbTipo);
        bindingGroup.addBinding(jComboBoxBinding);

        eLProperty = org.jdesktop.beansbinding.ELProperty.create("${lista}");
        jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, cboBeanBindingGrupoSuministro1, eLProperty, jcbGrupo);
        bindingGroup.addBinding(jComboBoxBinding);

        jLabel2.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel2.setText("GRUPO ANTECESOR:");

        jLabel3.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel3.setText("TIPO SUMINISTRO:");

        jbtAceptar.setFont(new java.awt.Font("Arial", 1, 12)); // NOI18N
        jbtAceptar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/iconoscomb/16x16ozygen/actions/button_ok.png"))); // NOI18N
        jbtAceptar.setMnemonic('A');
        jbtAceptar.setText("ACEPTAR");
        jbtAceptar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtAceptarActionPerformed(evt);
            }
        });
        jbtAceptar.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jbtAceptarKeyPressed(evt);
            }
        });

        jbtCancelar.setFont(new java.awt.Font("Arial", 1, 12));
        jbtCancelar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/iconoscomb/16x16ozygen/actions/button_cancel.png"))); // NOI18N
        jbtCancelar.setMnemonic('C');
        jbtCancelar.setText("CERRAR");
        jbtCancelar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtCancelarActionPerformed(evt);
            }
        });

        jLabel10.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel10.setText("SOBOBRA");

        jLabel9.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel9.setText("CTA LINK");

        jLabel8.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel8.setText("CTA PROV");

        jLabel6.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel6.setText("CTA COMP");

        jLabel7.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel7.setText("CTA VAREX");

        jLabel5.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel5.setText("CTATRAN");

        jLabel28.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel28.setText("CTAREC");

        jLabel29.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel29.setText("CRED FIS");

        jLabel24.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel24.setText("CTA OD");

        jLabel25.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel25.setText("CTA OH");

        jLabel22.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel22.setText("CTA 4TA");

        jLabel23.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel23.setText("CTA 721");

        jLabel26.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel26.setText("CTA ODI");

        jLabel27.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel27.setText("CTA OHI");

        jLabel19.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel19.setText("ACMD");

        jLabel18.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel18.setText("CTA INV");

        jLabel21.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel21.setText("CTA FONA");

        jLabel20.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel20.setText("ACMH");

        jLabel11.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel11.setText("IMPUESTO");

        jLabel12.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel12.setText("ACT MAT");

        jLabel13.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel13.setText("ACT PRO");

        jLabel14.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel14.setText("SERPRO");

        jLabel15.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel15.setText("CTA SER");

        jLabel16.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel16.setText("DONACION");

        jLabel4.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel4.setText("CTA ALM");

        jLabel17.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel17.setText("OTROS");

        jtfDescGrupo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jtfDescGrupoActionPerformed(evt);
            }
        });
        jtfDescGrupo.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jtfDescGrupoKeyPressed(evt);
            }
        });

        jLabel30.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel30.setText("DESC GRUPO");

        jtfCodGrupo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jtfCodGrupoActionPerformed(evt);
            }
        });

        jLabel1.setFont(new java.awt.Font("Arial", 1, 12));
        jLabel1.setText("CODIGO");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jLabel1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jtfCodGrupo, javax.swing.GroupLayout.PREFERRED_SIZE, 72, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(10, 10, 10)
                        .addComponent(jLabel30)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jtfDescGrupo, javax.swing.GroupLayout.DEFAULT_SIZE, 208, Short.MAX_VALUE)
                        .addContainerGap())
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addGap(83, 83, 83)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(layout.createSequentialGroup()
                                        .addGap(125, 125, 125)
                                        .addComponent(jbtCancelar))
                                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                        .addComponent(jbtAceptar)
                                        .addGap(133, 133, 133)))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 86, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(layout.createSequentialGroup()
                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addGroup(layout.createSequentialGroup()
                                            .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(10, 10, 10)
                                            .addComponent(ctaalm, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addGroup(layout.createSequentialGroup()
                                            .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(10, 10, 10)
                                            .addComponent(ctatran, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addGroup(layout.createSequentialGroup()
                                            .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(10, 10, 10)
                                            .addComponent(ctacmp, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addGroup(layout.createSequentialGroup()
                                            .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(10, 10, 10)
                                            .addComponent(ctavarex, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addGroup(layout.createSequentialGroup()
                                            .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(10, 10, 10)
                                            .addComponent(ctaprov, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addGroup(layout.createSequentialGroup()
                                            .addComponent(jLabel15, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                            .addComponent(ctaser, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addGroup(layout.createSequentialGroup()
                                            .addComponent(jLabel16, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                            .addComponent(donacion, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addGroup(layout.createSequentialGroup()
                                            .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                            .addComponent(sosobra, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 43, Short.MAX_VALUE)
                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                        .addComponent(jLabel28, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(jLabel21, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(jLabel22, javax.swing.GroupLayout.DEFAULT_SIZE, 57, Short.MAX_VALUE)
                                        .addComponent(jLabel19, javax.swing.GroupLayout.DEFAULT_SIZE, 57, Short.MAX_VALUE)
                                        .addComponent(jLabel20, javax.swing.GroupLayout.DEFAULT_SIZE, 57, Short.MAX_VALUE)
                                        .addComponent(jLabel24, javax.swing.GroupLayout.DEFAULT_SIZE, 57, Short.MAX_VALUE)
                                        .addComponent(jLabel23, javax.swing.GroupLayout.DEFAULT_SIZE, 57, Short.MAX_VALUE)
                                        .addComponent(jLabel26, javax.swing.GroupLayout.DEFAULT_SIZE, 57, Short.MAX_VALUE)
                                        .addComponent(jLabel25, javax.swing.GroupLayout.DEFAULT_SIZE, 57, Short.MAX_VALUE)
                                        .addComponent(jLabel27, javax.swing.GroupLayout.DEFAULT_SIZE, 57, Short.MAX_VALUE)
                                        .addComponent(jLabel29, javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(jLabel17, javax.swing.GroupLayout.DEFAULT_SIZE, 57, Short.MAX_VALUE)
                                        .addComponent(jLabel18, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGap(18, 18, 18)
                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(otros, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                .addComponent(ctafis, javax.swing.GroupLayout.DEFAULT_SIZE, 102, Short.MAX_VALUE)
                                                .addComponent(ctarec, javax.swing.GroupLayout.DEFAULT_SIZE, 102, Short.MAX_VALUE)
                                                .addComponent(ctaohi, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(ctaodi, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(ctaoh, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(ctaod, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(cta721, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(cta4ta, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(ctafona, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(acmd, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(acmh, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
                                            .addComponent(ctainv, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))))
                                .addGroup(layout.createSequentialGroup()
                                    .addComponent(jLabel14, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(serpro, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 220, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGroup(layout.createSequentialGroup()
                                    .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(actpro, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(220, 220, 220))
                                .addGroup(layout.createSequentialGroup()
                                    .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(10, 10, 10)
                                    .addComponent(actmat, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(220, 220, 220))
                                .addGroup(layout.createSequentialGroup()
                                    .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(10, 10, 10)
                                    .addComponent(impuesto, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(220, 220, 220))
                                .addGroup(layout.createSequentialGroup()
                                    .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(10, 10, 10)
                                    .addComponent(ctalink, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(220, 220, 220))))
                        .addGap(25, 25, 25))))
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jLabel2)
                        .addComponent(jLabel3))
                    .addGap(4, 4, 4)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jcbGrupo, 0, 303, Short.MAX_VALUE)
                        .addComponent(jcbTipo, 0, 303, Short.MAX_VALUE))
                    .addContainerGap()))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(jtfDescGrupo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel30)
                    .addComponent(jtfCodGrupo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 81, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(2, 2, 2)
                        .addComponent(jLabel4))
                    .addComponent(ctaalm, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel17)
                        .addComponent(otros, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(6, 6, 6)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(2, 2, 2)
                        .addComponent(jLabel5))
                    .addComponent(ctatran, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel18)
                        .addComponent(ctainv, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(6, 6, 6)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(2, 2, 2)
                        .addComponent(jLabel6))
                    .addComponent(ctacmp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(acmd, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel19)))
                .addGap(6, 6, 6)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(2, 2, 2)
                        .addComponent(jLabel7))
                    .addComponent(ctavarex, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(acmh, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel20)))
                .addGap(6, 6, 6)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(2, 2, 2)
                        .addComponent(jLabel8))
                    .addComponent(ctaprov, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(ctafona, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel21)))
                .addGap(4, 4, 4)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(4, 4, 4)
                        .addComponent(jLabel9))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(2, 2, 2)
                        .addComponent(ctalink, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(cta4ta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel22)))
                .addGap(3, 3, 3)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(2, 2, 2)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel10)
                            .addComponent(sosobra, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(3, 3, 3)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(cta721, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel23))))
                .addGap(8, 8, 8)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(2, 2, 2)
                        .addComponent(jLabel11))
                    .addComponent(impuesto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(2, 2, 2)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(ctaod, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel24))))
                .addGap(4, 4, 4)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(2, 2, 2)
                        .addComponent(jLabel12))
                    .addComponent(actmat, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(1, 1, 1)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(ctaoh, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel25))))
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(2, 2, 2)
                        .addComponent(jLabel13))
                    .addGroup(layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(ctaodi, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel26)))
                    .addGroup(layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(actpro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(ctaohi, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel14)
                            .addComponent(serpro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(jLabel27))
                .addGap(5, 5, 5)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel15)
                            .addComponent(ctaser, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(10, 10, 10))
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(ctarec, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel28))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel16)
                        .addComponent(donacion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel29)
                        .addComponent(ctafis, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jbtAceptar)
                    .addComponent(jbtCancelar))
                .addGap(35, 35, 35))
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(layout.createSequentialGroup()
                            .addGap(44, 44, 44)
                            .addComponent(jLabel2))
                        .addGroup(layout.createSequentialGroup()
                            .addGap(42, 42, 42)
                            .addComponent(jcbGrupo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(layout.createSequentialGroup()
                            .addGap(13, 13, 13)
                            .addComponent(jLabel3))
                        .addGroup(layout.createSequentialGroup()
                            .addGap(11, 11, 11)
                            .addComponent(jcbTipo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap(428, Short.MAX_VALUE)))
        );

        bindingGroup.bind();

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jbtAceptarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtAceptarActionPerformed
        int res = javax.swing.JOptionPane.showConfirmDialog( this,"Esta seguro que desea modificar el grupo de suministro ?",
                "Confirmar",javax.swing.JOptionPane.YES_NO_OPTION );
        if(res==javax.swing.JOptionPane.YES_OPTION){
            if(validar()){
                this.registrar();
                try {
                    Listas.cargarGrupoSuministros();
                } catch (Exception ex) {
                    Logger.getLogger(jifAdministrarGrupo.class.getName()).log(Level.SEVERE, null, ex);
                }
                }
        }
}//GEN-LAST:event_jbtAceptarActionPerformed

    private void jbtAceptarKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jbtAceptarKeyPressed
        if(KeyEvent.VK_ENTER == evt.getKeyCode() ||KeyEvent.VK_TAB == evt.getKeyCode()  ){
            this.jbtAceptar.doClick();
        }
}//GEN-LAST:event_jbtAceptarKeyPressed

    private void jbtCancelarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtCancelarActionPerformed
        int res = javax.swing.JOptionPane.showConfirmDialog( this,"Esta seguro de salir?",
                "Confirmar",javax.swing.JOptionPane.YES_NO_OPTION );
        if(res==javax.swing.JOptionPane.YES_OPTION){
            this.dispose();
        }
}//GEN-LAST:event_jbtCancelarActionPerformed

    private void jtfDescGrupoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtfDescGrupoActionPerformed
        this.buscarGrupos();
}//GEN-LAST:event_jtfDescGrupoActionPerformed

    private void jtfDescGrupoKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jtfDescGrupoKeyPressed
        if(KeyEvent.VK_ENTER == evt.getKeyCode() ||KeyEvent.VK_TAB == evt.getKeyCode()  ){
             if (this.jtfCodGrupo.getText().trim().length() > 0){
            this.jtfCodGrupo.setText("");
        }
        }

}//GEN-LAST:event_jtfDescGrupoKeyPressed

    private void jtfCodGrupoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtfCodGrupoActionPerformed
        if (this.jtfCodGrupo.getText().trim().length() < 1)
            this.jtfDescGrupo.requestFocus();
        else
            this.buscarGrupos();
}//GEN-LAST:event_jtfCodGrupoActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTextField acmd;
    private javax.swing.JTextField acmh;
    private javax.swing.JTextField actmat;
    private javax.swing.JTextField actpro;
    private administracion.BeanBinding.CboBeanBindingGrupoSuministro cboBeanBindingGrupoSuministro1;
    private administracion.BeanBinding.CboBeanBindingTipo cboBeanBindingTipo1;
    private javax.swing.JTextField cta4ta;
    private javax.swing.JTextField cta721;
    private javax.swing.JTextField ctaalm;
    private javax.swing.JTextField ctacmp;
    private javax.swing.JTextField ctafis;
    private javax.swing.JTextField ctafona;
    private javax.swing.JTextField ctainv;
    private javax.swing.JTextField ctalink;
    private javax.swing.JTextField ctaod;
    private javax.swing.JTextField ctaodi;
    private javax.swing.JTextField ctaoh;
    private javax.swing.JTextField ctaohi;
    private javax.swing.JTextField ctaprov;
    private javax.swing.JTextField ctarec;
    private javax.swing.JTextField ctaser;
    private javax.swing.JTextField ctatran;
    private javax.swing.JTextField ctavarex;
    private javax.swing.JTextField donacion;
    private javax.swing.JTextField impuesto;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JToolBar jToolBar1;
    public javax.swing.JButton jbtAceptar;
    private javax.swing.JButton jbtCancelar;
    private javax.swing.JComboBox jcbGrupo;
    private javax.swing.JComboBox jcbTipo;
    private javax.swing.JTextField jtfCodGrupo;
    private javax.swing.JTextField jtfDescGrupo;
    private javax.swing.JTextField otros;
    private javax.swing.JTextField serpro;
    private javax.swing.JTextField sosobra;
    private org.jdesktop.beansbinding.BindingGroup bindingGroup;
    // End of variables declaration//GEN-END:variables

}
